<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>摩旅圈App后台管理</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.default.css" type="text/css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/prettify/prettify.css" type="text/css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/prettify/prettify.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-migrate-1.1.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-ui-1.9.2.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.flot.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.flot.resize.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.cookie.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/custom.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
</head>

<body>

<div class="mainwrapper">
	
    <!-- START OF LEFT PANEL -->
    <div class="leftpanel">
    	
        <div class="logopanel">
        	<h1><a href="${pageContext.request.contextPath}/index.jsp">摩旅圈 <span>v1.0</span></a></h1>
        </div><!--logopanel-->
        
        <div class="leftmenu">
				<ul class="nav nav-tabs nav-stacked">
					<li class="nav-header">主功能</li>
					<li class="dropdown"><a
						href="${pageContext.request.contextPath}/index.jsp"><span
							class="icon-pencil"></span> 发帖</a>
						<ul>
							<li><a
								href="${pageContext.request.contextPath}/post_find.jsp">发现贴</a></li>
							<li><a
								href="${pageContext.request.contextPath}/post_picture.jsp">图文贴</a></li>
							<li><a
								href="${pageContext.request.contextPath}/post_team.jsp">组队贴</a></li>
							<li><a
								href="${pageContext.request.contextPath}/post_trade.jsp">交易贴</a></li>
						</ul></li>
					<li class="dropdown"><a
						href="${pageContext.request.contextPath}/post_elite.jsp"><span
							class=" icon-edit"></span> 帖子管理</a>
						<ul>
							<li><a
								href="${pageContext.request.contextPath}/posts/getAllPostsDiscover">发现贴</a></li>
							<li><a
								href="${pageContext.request.contextPath}/posts/getPostsPic">图文贴</a></li>
							<li><a
								href="${pageContext.request.contextPath}/posts/getPostsFriend">组队贴</a></li>
							<li><a
								href="${pageContext.request.contextPath}/posts/getPostsTrade">交易贴</a></li>
						</ul>
					</li>
					<li class="dropdown"><a
						href="${pageContext.request.contextPath}/media.jsp"><span
							class="icon-picture"></span> App图片</a>
						<ul>
							<li><a
								href="${pageContext.request.contextPath}/welcome.jsp">欢迎页配置</a></li>
							<li><a href="${pageContext.request.contextPath}/start_pic.jsp">首页轮播图</a></li>
						</ul></li>
					<li><a href="${pageContext.request.contextPath}/user/userList"><span
							class="iconsweets-male"></span> 用户管理</a></li>

				</ul>
			</div>
			<!--leftmenu-->
        
    </div><!--mainleft-->
    <!-- END OF LEFT PANEL -->
    
    <!-- START OF RIGHT PANEL -->
    <div class="rightpanel">
    	<div class="headerpanel">
        	<a href="" class="showmenu"></a>
            
            <div class="headerright">
    			<div class="dropdown userinfo">
                    <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="/page.jsp">Hi, ${sessionScope.username}&nbsp;! <b class="caret"></b></a>
                    <ul class="dropdown-menu">
							<%-- <li><a href="${pageContext.request.contextPath}/index.jsp"><span
									class="icon-edit"></span> 修改密码</a></li> 
							<li class="divider"></li>--%>
							<li><a href="${pageContext.request.contextPath}/login.jsp"><span
									class="icon-off"></span> 退出</a></li>
						</ul>
                </div><!--dropdown-->
    		
            </div><!--headerright-->
            
    	</div><!--headerpanel-->
        <div class="breadcrumbwidget">
        	<!-- <ul class="skins">
                <li><a href="default" class="skin-color default"></a></li>
                <li><a href="orange" class="skin-color orange"></a></li>
                <li><a href="dark" class="skin-color dark"></a></li>
                <li>&nbsp;</li>
                <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
                <li class="wide"><a href="" class="skin-layout wide"></a></li>
            </ul>skins -->
        	<ul class="breadcrumb">
                <li><a href="${pageContext.request.contextPath}/index.jsp">Home</a> <span class="divider">/</span></li>
                <li class="active">交易贴</li>
            </ul>
        </div><!--breadcrumbwidget-->
        
        <div class="maincontent">
        	<div class="contentinner">
            	
                <div class="widgetcontent">
                	<form class="stdform" action="${pageContext.request.contextPath}/posts/addTradePosts" enctype="multipart/form-data" method="post">
							<p>
							<input type="hidden" name="postsType" value="2">
							</p>
                        <p>
                        	<label>帖子主题</label>
                            <span class="field"><input type="text" name="postsSubject" class="input-xlarge" placeholder="请输入帖子主题" /></span>
                        </p>
                        
                        <p>
                        	<label>帖子内容</label>
                            <span class="field"><textarea cols="80" rows="5" name="postsContent" class="span5" placeholder="请输入帖子内容"></textarea></span> 
                        </p>
			
						<p>
                            <label>帖子图片</label>
                            <span class="field">
                            	<input type="file" class="uniform-file" name="post_pic" /><input type="text" name="picdesc" placeholder="图片简单说明" />
                            </span>
                        </p>

						<!-- <p>
                            <span class="field">
                            	<input type="file" class="uniform-file" name="post_pic" /><input type="text" name="picdesc" placeholder="图片简单说明" />
                            </span>
                        </p>

						<p>
                            <span class="field">
                            	<input type="file" class="uniform-file" name="post_pic" /><input type="text" name="picdesc" placeholder="图片简单说明" />
                            </span>
                        </p> -->
	
						<span class="field">
							<div id="add"> 
 
							</div> 
						</span>

						<p>
							<span class="field">
							<span class="icon-plus"></span>
							<input name="" type="button" value="添加帖子图片" onClick="AddElement('file')" /> 
                            </span>
							
						</p>

						<hr/>
						<p>
							<label>交易类型</label>
							<span class="field">
							<select name="postsTradeType" class="uniformselect">
                            	<option value="1">机车</option>
                                <option value="2">头盔</option>
                                <option value="3">骑行服</option>
                                <option value="4">其他</option>
                            </select>
                            </span>
						</p>
						<p>
							<label>基本信息</label>
							<span class="field">
							<div id="tabs">
									<ul>
										<li><a href="#tabs-1">机车</a></li>
										<li><a href="#tabs-2">头盔</a></li>
										<li><a href="#tabs-3">骑行服</a></li>
										<li><a href="#tabs-4">其他</a></li>
									</ul>
									<div id="tabs-1">
										<p>
											<label>机车车型</label>
											<span class="field"><input type="text" name="postsTradeName" class="input-xlarge" placeholder="请输入机车车型" /></span>
										</p>
										<p>
											<label>机车年份</label>
											 <span class="field"><input type="text" name="postsMotoTime" class="input-xlarge" placeholder="请输入机车年份" /></span>
										 </p>

										 <p>
											<label>公里数</label>
											 <span class="field"><input type="text" name="postsMotoKilometer" class="input-xlarge" placeholder="请输入机车公里数" /></span>
										 </p>
										 <p>
											<label>心里价格</label>
											 <span class="field"><input type="text" name="postsMotoCost" class="input-xlarge" placeholder="请输入心里价格" /></span>
										 </p>

										 <p>
											<label>联系方式</label>
											  <span class="field"><input type="text" name="postsMotoPhone" class="input-xlarge" placeholder="请输入联系方式" /></span>
										 </p>
									</div>
									<div id="tabs-2">
										<p>
											<label>头盔名称</label>
											<span class="field"><input type="text" name="postsTradeName" class="input-xlarge" placeholder="请输入头盔名称" /></span>
										</p>
										<p>
											<label>头盔成色</label>
											<span class="field"><input type="text" name="postsMotoQuality" class="input-xlarge" placeholder="请输入头盔成色" /></span>
										</p>
										
										<p>
											<label>心里价格</label>
											<span class="field"><input type="text" name="postsMotoCost" class="input-xlarge" placeholder="请输入心里价格" /></span>
										</p>
										<p>
											<label>联系方式</label>
											<span class="field"><input type="text" name="postsMotoPhone" class="input-xlarge" placeholder="请输入联系方式" /></span>
										</p>
									</div>
									<div id="tabs-3">
										<p>
											<label>骑行服名称</label>
											<span class="field"><input type="text" name="postsTradeName" class="input-xlarge" placeholder="请输入骑行服名称" /></span>
										</p>
										<p>
											<label>骑行服成色</label>
											<span class="field"><input type="text" name="postsMotoQuality" class="input-xlarge" placeholder="请输入骑行服成色" /></span>
										</p>
										
										<p>
											<label>心里价格</label>
											<span class="field"><input type="text" name="postsMotoCost" class="input-xlarge" placeholder="请输入心里价格" /></span>
										</p>
										<p>
											<label>联系方式</label>
											<span class="field"><input type="text" name="postsMotoPhone" class="input-xlarge" placeholder="请输入联系方式" /></span>
										</p>
									</div>
									<div id="tabs-4">
										<p>
											<label>名称</label>
											<span class="field"><input type="text" name="postsTradeName" class="input-xlarge" placeholder="请输入名称" /></span>
										</p>
										<p>
											<label>成色</label>
											<span class="field"><input type="text" name="postsMotoQuality" class="input-xlarge" placeholder="请输入成色" /></span>
										</p>
										
										<p>
											<label>心里价格</label>
											<span class="field"><input type="text" name="postsMotoCost" class="input-xlarge" placeholder="请输入心里价格" /></span>
										</p>
										<p>
											<label>联系方式</label>
											<span class="field"><input type="text" name="postsMotoPhone" class="input-xlarge" placeholder="请输入联系方式" /></span>
										</p>
									</div>
								</div>
							 </span>
						</p>

                        <p class="stdformbutton">
                            <button class="btn btn-danger">发帖</button>
                            <button type="reset" class="btn btn-info">重置</button>
                        </p>
                        
                        
                    </form>  
                </div>
        </div>
    </div>
    
</div><!--mainwrapper-->
<script type="text/javascript">
function AddElement(mytype){  
var mytype,TemO=document.getElementById("add");  
var newInput = document.createElement("input");   
newInput.type=mytype;   
newInput.name="filename";  
TemO.appendChild(newInput);  

var newInput2 = document.createElement("input");   
newInput2.type="text";   
newInput2.name="posts_picture"; 
newInput2.placeholder="图片简单说明";
TemO.appendChild(newInput2);

var newline2= document.createElement("br");  
TemO.appendChild(newline2);  

var newline3= document.createElement("br");  
TemO.appendChild(newline3); 

}  
</script>
</body>
</html>
